package dao

import (
	"srv-server/basic/global"
)

func GetOneId[T any](Where *T, data *T) bool {
	err := global.DB.Where(Where).Find(&data).Error
	if err != nil {
		return false
	}
	return true
}

func Create[T any](data *T) bool {

	err := global.DB.Create(&data).Error

	if err != nil {
		return false
	}
	return true
}
